package user;

import operate.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 05 - 10
 * Time: 21:30
 */
public class NormalUser extends User{
    public NormalUser(String name) {
        super(name);
        this.iOperation = new IOperation[]{//选好身份之后，各种操作就会被new好
                new ExitOperate(),
                new FindOperate(),
                new BorrowOperate(),
                new ReturnOperate(),
        };
    }
    @Override
    public int menu() {
        System.out.println(this.name + " 欢迎来到普通用户菜单");
        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("3.归还图书");
        System.out.println("0.退出系统");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }
}
